/**
 * 
 */
package com.magnusart.scrumify.dao;

import com.magnusart.scrumppm.model.Project;
import com.magnusart.scrumppm.model.ProjectBuilder;
import com.magnusart.scrumppm.model.Story;
import com.magnusart.scrumppm.model.StoryBuilder;
import com.magnusart.scrumppm.model.Task;
import com.magnusart.scrumppm.model.TaskBuilder;

/**
 * This is the main entry point to get DAO-objects.
 * Abstract base class
 * @author Magnus Andersson
 *
 */
public abstract class DAOFactory
{

	private final static HsqlDbDAOFactory daoFactory;

	static {
		daoFactory = new HsqlDbDAOFactory();
	}
	
	/**
	 * Get a Project Data Access Object
	 * @return The specified DAO
	 */
	public abstract  CommonDAO<Project, Project, ProjectBuilder> getProjectDAO();
	
	
	/**
	 * Get a Task Data Access Object
	 * @return The specified DAO
	 */
	public abstract CommonDAO<Story, Task, TaskBuilder> getTaskDAO();


	/**
	 * Get a Story Data Access Object
	 * @return The specified DAO
	 */
	public abstract CommonDAO<Project, Story, StoryBuilder> getStoryDAO();
	
	/**
	 * Get the a DAO Factory
	 * @return
	 */
	public static DAOFactory getDAOFactory() {
			return daoFactory;
	}
}
